@extends('layout.index')
@section('title','轮播图修改')
@section('content')
	<div class="mws-panel grid_8">
    <div class="mws-panel-body no-padding">
        <form action="/admin/carousel/update" method='post' class="mws-form " enctype="multipart/form-data">
        @if (count($errors) >0)
            <div class='mws-form-message error'>
                修改失败!
                <ul>
                    @foreach ($errors->all() as $error)
                        <li>{{$error}}</li>
                    @endforeach

                </ul>
            </div>
        @endif
            <div class="mws-panel grid_8">
                    <div class="mws-panel-header">
                        <span>轮播图修改</span>
                    </div>
                    <div class="mws-panel-body no-padding">
                        
                        <div class="mws-form-inline">

                            <div class="mws-form-row">
                                <label class="mws-form-label">是否选中显示:</label>
                                <div class="mws-form-item">
                                    <select class="smallinfo" name='delcimgs'>
                                        <option value ="c" @if( $cimgs->delcimgs == 0 )
                                                           selected
                                                           @endif >否</option>
                                        <option value ="x" @if( $cimgs->delcimgs == 1 )
                                                           selected
                                                           @endif>是</option> 
                                    </select>
                                </div>
                            </div>
							
							

                			<div class="mws-form-row">
                                <label class="mws-form-label">图片名:</label>
                                <div class="mws-form-item">
                                    <input type="text" class="smallinfo" name='picName' value='{{$cimgs->picName}}'>
                                </div>
                            </div>

                            <div class="mws-form-row">
                                <label class="mws-form-label">原图片:</label>
                                <div class="mws-form-item">
                                    <label class="mws-form-label">
                                        <img src="{{$cimgs->pic}}" alt="" width='100px'>
                                    </label>
                                </div>
                            </div>

                            <div class="mws-form-row">
                                <label class="mws-form-label">新图片:</label>
                                <div class="mws-form-item">
                                    <div style="position: relative;" class="fileinput-holder">
                                    
                                        <input name= "pic" type="file" style="position: absolute; top: 0px; right: 0px; margin: 0px; cursor: pointer; font-size: 999px; opacity: 0; z-index: 999;">
                                        
                                    </div>
                                </div>
                        	</div>

                            <div class="mws-button-row">
                            	<input type="hidden" name='id' value='{{$cimgs->id}}'>
                    			<input type="submit" value="提交" class="btn btn-danger">	
                    		</div>
							{{csrf_field()}}
                        </div>
                    </div>            
	        </form>
	    </div>      
	</div>
@endsection